refactor some code and new graphics