amd and plain js now working