modified function with (-1)