add script to do set env vars
refactor types