hook for testing purposes