minor improvements. remove error throw