delete, insert and update pages into DB --other fixes