removed testing code and logging