added question 1 to scala