no need to repeat the same part of the code in every if statement