added cuda version
some fixes