parse staged functions correctly