added run script and fixed errors