removed asserts for error checking