Added readLocationByObject function