added validator class, added convertCoordsToPos method