MayStreet interview question

fix some badly written code