split functions

Signed-off-by: Aleksey Snisar <saiuz2000@gmail.com>