creating gardes with js