added screenshot and state save support
recomited