You're making this harder and less efficient.
There are far better ways of accomplishing this.
But be aware that the fixed values depend on a lot of things, which means a small change on the frame...