moved conditional into view script-file