added stage parameter