wrote out my own long and lat function