added convertxytolatlng and convertupsidedownxytolatlng functions