fixes not a function error