draft with sub program instead of jumps