changed how ui is passed around