first wokring version
adding faster version
working version to allow trigger on node table