updated fixed some bugs