added early graphics code