changed some logic for cdh5