Add conditionals and functions