improved karma calculation