implemented args and debug, this closes #3