added all __host__ __device__