new draw function now working, cursor and viewport handling missing