reworking graphics library