implemented all menu functions