cleanup of code