finished implementing new mutate() method. Appears to work correctly now. Removed old mutate implementation