changed component snippet to AMD instead of CommonJS