added logic to carry out the basic game aspect