ready for initial test, p loops need tuned