trim output properly; easier handling of test data