removing unused function
implementing env handling

final additions to handle multiple environmets