clean up computation logic