remove mutual vars
started using shared mem for applyF