move script to a separate file