refactored into single node