made paintghostimage() public