res
fixed tests basic logic