script to check gm