separate part of the logic from the master behavior node for testing purpose