Added score by frames function