finished quad_func.s