add edit functional === need to refactor