Working on refactoring copy and paste