serial implementation of hard disk codes