Changed None to 0 for easier objective function