add edit api for testing