code refactoring, bug fixing