some changes in syntax of internal functions