Change cons to list