add common helper, fixed bug in basket