fixed bug in generate (arguments) added test for special case....