added length limits on inputs