change names, add namespace, divide into two classes