upgraded with the CrossEntropyCost function