added documentation to IF