improve form edit and new flat