wip half as much code as needed to open a file