adding assertion handlings