Adding number of unterminated copies
adding repository function