two functions became one