get function to work