Add missing parameter
Simplify the implementation