added function "power", fixed some bugs