add print method to QF class