cleanup of the implementation