updated: bug fixed and improvements