improve implementation and reuse rom contents