sloppy finish needs refactoring