add ghost functionality