added some logging

logs results instead of printing. Still needs work out but should be
well for a start