added test for new optimization