adding abstraction and changing name

took out hard coded lines of code