1D works, need to fix small bug so different numeric types will work too