added the ghost-checkbox code