sample code for random choice