implemented changes as per Gilmar's and Brandon's comments

Signed-off-by: Marcin Wiatr <mail.wichura@gmail.com>