Added some conditionals