clean up code reduced inference