added print all function and implementation