more readable environment parsing