changed source and added additional global for %setup to work properly