check binary tree code