bugfix: proper data calculation