added firest vers of working script