minor cleanup of the code