added a testing mechanism