removed testing code and clean up