added script saving features