refactored to make my life easier down the road