function get_credentials() and is now making use of @environment