Wrote GSI calculator and tests