first commit

i don't remember what this does, will look at it later. for now, it
seems to have some scipy usage which i could refer to later