modify sell logic