fix endpoints add return statement