moved phases into class form