parametrized according to p and a. added two slides. real-time updating from sliders