create testing script, fix bugs and tag M1