minor fixes
added gridmath