Cleaned up a bit, was trying to reference pos before pos was populated with lat and long