added functionalities for editing database