new game functions
table locking mechanizm added
refactored