source code for passing all tests