Started rewriting to give better output