move className to outer scope