refactored to use typed-record instead of vector in megatest.scm