finished check function