implemented drawing engine