Modified dilation code