more refactoring of /prog