export function for direct use