code update, bug fixing