finalize and make tests work