added buttons on the pop up window and corresponding changes.