merged some stuff with pfista