create a "class" in plain js