working on graphics and statemanagement