added singleton double checking, trinary tree and maze