added more logic to node section