updated get function