fixes #4 bought items is not calculated properly