using old loop