added some comments and ready event