a set of r auxilary functions