added edit and history variables