Seems to be dead code, remove this function?