first draft done - debugging