Modify Ashton's code