Added buy_from_set method and gixed bug in can_buy