outputting now works, results still seem off