add getMethod to Environments
playing with pattern matching