implemented the score4x function