added test to verify the correct result