new func and more cleanups

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
cleanup

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>