initial port to requirejs
porting...