simplify get function