minor changes after discussion with @deep