modified the location class