more code rearagements for better macro insertion.