adding pimage stuff