finished main interface