added functions to prepare and do meta-analysis