added all the code ofr a new gpu version, faster than the first one