changed the main interface, updated the doc