moved b_method outside if cause it's needed as a method in the else