added some logic

Signed-off-by: Alex Rydzak <alex@rydzak.me>