what does this function do?