added dismiss function for stock view