refactoring in sms receiver