Subprogram design