removing loading bar effects and extracting debug statements