replaced depricated method call