changed id to code for locate method