complete
refactoring for submission