this can be written as switch statement ( I will show it below how )