moved location of strtrim call.