added comments and arg option for debugging