1. Replaced duplicated compute with generic compute