simplified code by using numbers instead of languages