cleaning up events and adding some sms function