commit 4 :  functions for user score calculation added