scala problems 5-10