implement main interface