Added some conditions