final solution