Adding Sam's new code + some test classes