all done except for comments
consider this ported