added module to detect leaf pages