Adds phase calculations