updated subroutine prog