printing to result fixed