use generalized functions