created actual function and made function one line