Fix: function declaration and calling