Implemented the repo layer for creating state