added event.js, pubsub.js, fix in function.js