write the three lines a bit clearer with if and else