add __repr__(), and some style fix