refactored code not working as well as older code