rename file
fixes and refactoring