minor editing and formatting to the two programs