added set position function