attempt 2 at fixing lazy io