implemented phase correction function