fix some bug

delete some non-exist function
change the sequence of getLocations
add return status when 404