changed counter functions to one functions
started adding facts -- not done