manually added mpnguyen's changes