Added functionarlity to create and destroy records