finished ex47 and added buggy ex48 tests