finish api with output
check