added more conditions
added more conditions