reflowed a few things thanks to Eric