Switch get function to 'with' method