Final version, with working test script and all the works