corrections and refactoring