use scalar reverse to reverse a scalar instead of converting it to list firstly