Added weight and chars functions