Added an implementation without exceptions handling