incorporated justin/Ben's changes and fixed some formatting
ben justins changes and formating fixes