Reduce if statement
better variable declaration