nearly got uniforms working, improved error checking!