c/p code should be generalized