add createNewNode method and (some) tests