added stage2 support