mostly removing dead code