implementing if-statement (ref #193)