removing unnecessary method calls.