Addded some conditions