adds javascript action function
correts javascript functions to math naming pattern