Added proper function types