write old code