delete locations code is much clean now