implemented IF