added set function and position constructor