fixed depricated method call