refactor delete page feature