putting the external layer logic back in