move script to common