finnished basic crud functionality