add additional assertion for error checking