upd graphics code