code working with loops and lists