put return code in only 1 location