message handler for listener implementation ph-1
bug fixing(null pointers) and some neme refactoring and listener message handlers implementation ph-1