made the interface and repository generic

this is better for code reuse