try improve the bug brank
cut down some unuseful code