taking a vertical slice from a file