Reformat interface

build main interface function