creating generic repository