cleaned some code
split node from implementation