apply Mike's changes in shared