added assertion + logger