added print results function