Implemented necessary methods for localization. Note: Has not been tested