added exit param

removed unnecessary macro for static functions