restructured sm server to serve all sms