update to new APIs

Signed-off-by: swpd <swpdtz@gmail.com>