added action.js file with pseudo code