Changed the length property to a method