simplyfied error triggereing
added method for testing for data