added fork wrapper for testing