half of first problem, alge excercise 2