wirtting new function now