max length argument added and test data