implement function code check