Use cond instead of let