I'm not sure if this "if and else" block is needed, could we generalize it?