scip exercise in scala