add more stack-related code