added subgoal.js