main routine of raytracer