Add rand util and finish command struct