added convert function
Signed-off-by: Mykola Yaremov <n.yaremov@gmail.com>