Added some supporting code