adapted to the latest spree (1.3.3)