added sw diagram