An algebraic proof of Bogomolov-Tian-Todorov theorem