can I write this without the three if then;s