updated to remove processing of less than 5 characters