fixed classmethod implementation of extract_from_cos