Initialize length variable