fix argument handling (again...); leave debugging outputs in place for now