almost done. formatting errors left