remake, using my own api library

Signed-off-by: Adrian Matejov <a.matejov@centrum.sk>