Updated get_Qs to use get_S