finish all the views functions