A02:merge with Haley's code