tweaks, works on real data now