function for computer to pick added