draw function done - except tab handling, ensure vieport function needs to be rewritten too