first working version

seems to give the current state of the printer correctly