adding gameplay logic