minor changes, ready to test in chunks