Started writing evaluation function