adding in error throw