added conditonals all working