refactoring, renaming, fix whitespace