finished porting calculations; annotated our comments with my initials