updated for percentage. added min/max validation