add outputAttractors function