stan's code