Initial scoring code