Generalized repository functions