added if functions