remove use of super global _SERVER and use env() method