add action js and change structure