integrate @chalin feedback