scala assignment 3