credits updated
functions made for loops in main game loop