cleaner implementation with helper object for program creation