basic lapp API, to be re-organise