made identifier optional on getStack()
fixed unit tests