initial scoring code