modularized the code, started working on a second player function