clean up impl for perf