add cookies
fix pause on window focus out
change DB service function