Removed code which throws a runtime exception if something goes wrong - please handle this explicitly in client code