cleanup code and comment