Implemented the printRecord method