Fixed some bugs. Add la function.