added test and code passing that test