implemented loading the correct data into the fields