debugging code

check why conditions are not working