added pos param to constructor and make pos property private