add missin code from the solution