added some code from webgl-homework-2