refactored how coordinates are computed to use easier pixel based system instead
of relative offsets