add menu functionality
style menu and fix undefined bug