check function is working