Added functions from Eric