update the function instead maybe