added stages impl