try to fix macro problems. improve and or functions