added if test