Added if
Finished tests