revise io, fixed output, modified rule type

note:position is updated and copied for recording