added pick and pickAcc, min function broken