(1) add random algorithm (2) set app as portrait up