this should be checking the length