added functions and menu