should raise exception if receives negative values