add logging
graphics transform impl; refactor for simplicity