added more code to /locate