added initial version
started adding gpu support