added max length validation