Working classification on mnist dataset