add blog controller and fix some function