used sed magic to assist with my poor software engineering