fix issue 3. use macro for temporary. some functions do not work