solve edit functionality