struggling with getting the new refactored implementation to work