adding graphics code