code for Ghost