added a method position class to get position coordinates