improved amount validation