apply necessary changes to work with CDH5