added some buy and sell checks