my version of @dis.sociat.ing's dollcode algorithm in python
new