Added repository function