common set of assertion function