added finalize and spot for tests