applied the function