added ,apreduce for calculating score