Issue #118, adding some constraints to the input