added type information
removed an assertion which is not valid in all cases