implement sell functionality