app basic structure and add function