add length and isEmpty