debugging new add function