made environment variable configurable.
converted extention pattern to functional composition.