added assertion to track error