converting to jqueryless js