Not sure if these functions belong into this file.