implemented conditional expression