added conditional logic

conditionals and extra js