first draft of pyp_means.py