refactors chip8