remove useless callback and improve syntax in addDatabase function