some useful code，mainly for view and learning from them