remove an unnecessary method and fixed a small bug