removing Result class and replacing with output calls