solution for the first assesment