created printing each element & length functions