moved decision js to separate file