added error throw