Change condition for printResults method