implementing crud functionality