new functions and wrap macro changed