Trying to abstract out phases