change interface of some subroutines
adjust for Alex Best HNF 20140818