fixed bugs, added update script