update to support ref and env on github