improved assert