update README with input types. Fix a bug in global vars