fix setting name testing
add return mode, setting in hooks