created a script for automatically running and stats collection