trunk js
logic in enviornments fixed