Made Multiple Levels, and combined SD functions