cleaned up to use a view transform