here we go... merging in modified version that tracks read types