started on encoding moves, probably going to need circular references