version .5 with debugging added