added calc mean to prep