using tenary operator for return