get_loc now returns pointer. removed debugging lines