refactored, removed unnecessary code, etc.