created if else functions