converted activity.js to funcjs arch