moved globals into services