modify functions to add async tag for JS