some refactoring and update

Signed-off-by: Jakub Nacik <jakub.nacik@nbdesigns.sk>