refactoring
(forgot to add these to the last commit)