weight and chars functions (basics)