move to view so that it is always called