implemented beam and contour reading from file.