solution and automated tests added