added missing trim() to output