use ternary operator for applying default values