solving exercise