basic check function