solved error: on complete function