still working on pyp_means algo