chatting on IRC and discovered a better way to do part 1 as well. cleaner.