move farm script to farm.js