updated to version 1.2 and fixed some bugs