else-if support added