add overflow counting