add a debug parameter which shows the vars as print_r