refactored DialogBuilder, added edit possibility to edit records