refactored to use amdefine instead of requirejs