added method to trim fields prior to processing