add appbase.js code