add proc_equal
add factorial function