more bugs around data output and calculations hopefully fixed