fixing issue dealinf with spaces and trim