added functions and created general function to run actions with the nexus
added functions and created general function to run actions with the nexus