some changes and extentions to utilities