removing extra space and removing console