buyHistory working