#1 implemented repository and storage, not tested, but hopefully works