basic structure and ui implementation