added check menu functionality and raise error if not on the menu