edit main and details files