changed logic for showing viewing actions