Code for test (up to the end of step 2 in README)