added most of the enrollment behaviour