slight refactor to account for new ability to use headers etc