SMS: Algorithm Design: