Added getLocationbyId method