used requirejs dirty hack and prototypicl inheirtance which close #6