Dynamic working in separate script