Added logic to edit questions