made constructor with position parameter in position class