length method added, fixes