overflow logic