added some lines to break up the code into section
more annotations and FIXME notes