initial pyso-em. not really tested yet. probably needs a lot of work still.