Implmented get_offsets and tested its functionality.