did a quick pseudo code write up for assembly