enhanced match, rotate and print functions
enhanced match, rotate and print functions