added stack frame analysis