hookup functions for script running