edit functionality works