merging today's changes into metrics branch for Paul