manually merging Daniel's changes