extracted setAccessible for methods