cleanup - removing duplicate code