updates to make the merged code compile and pass tests