moved map script to local file