added hooks for testing