refactored position setting where offsetPosition was easier to use