debug baseFunction