Move this out of this function?