added if function + upgraded version number