add new and edit entries