Added flexible parameter for testing.