added getenv function