improved the raw file reconstruction from xyz planes