Re-writing basket functionality