Added solution for Q4