updated check function