moving score logic to dashboard