Added a check to the edit function to match user id