refactor ROM.h