Code for SpriteIO (not spriteio)