cleaned up issue with code that needed to be abstracted in background