updated to use new function(s)