added temp declaration in doit to avoid warning