graphics logic