graphics library adapted