document helper functions