James C - polymorphism
James C - added safety to tests