removed code for more DRY practices