add length and create schema