move easygird to js file