added conditional logic to views for review