Added edit function with retrieving of values