refactored code and changed test so it didnt backfire