move static methods out of prototype, pull G out function so it's not allocated everytime the function is called.