updated code for shop condition