Added a couple of extension methods