Added new environment for not broken cases
Switch structure single case works
EXtracted loop code to a different method and fixed switch to include the inserting environment in every case