integrated Mike's changes