add two primary loops in my programm