added getcos and cs