wouldn't be better to use a switch instead of multiple if in this case ?