display data working with loops passing without any errors