removed testing code and modified white space removal