adding latest Pstack code chagnes