Working (In progress) version of SM driver