This is used to complete PS given by CS2010