function main menu, closes #4