-- trying to built a global function running on server startup