use helper function for doc