add join, height of tree, some basic function for Graham Scan