mod locate function