add a little more commenting and rearranging to make more clear for communicating with tim?!