top level api